package cn.tedu.charging.order.dao.mapper;

import cn.tedu.charging.order.pojo.po.ChargingBillSuccessPO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

//org.apache.ibatis.annotations.Mapper; 用这个
//@org.mapstruct.Mapper 这个不对
//@Repository   这个也不需要
@Mapper //6.4配合数据库创建
public interface OrderSuccessMapper extends BaseMapper<ChargingBillSuccessPO> {

    //Insert注解是在实现insertOrder方法,如果你不实现,把Insert注释掉,报异常，说是需要xml？？
    //Invalid bound statement (not found): cn.tedu.charging.order.mapper.OrderSuccessMapper.insertOrder
    //mybatis的话，需要有注解并说清楚语句，不然报绑定错误     xml文件里
    @Insert("insert into charging_bill_success(bill_id)  values (#{billId})")
    void insertOrder(ChargingBillSuccessPO po);
}
